package thread;

public class ThreadDemo2 {
    public static void main(String[] args) {
        Runnable r1 = new MyRunnable1();
        Runnable r3 = new MyRunnable3();
        Runnable r2 = new MyRunnable2();
        Runnable r4 = new MyRunnable4();
        Runnable r5 = new MyRunnable5();
        Runnable r6 = new MyRunnable6();
        Runnable r7 = new MyRunnable7();
        Runnable r8 = new MyRunnable8();
        Runnable r9 = new MyRunnable9();
        Runnable r10 = new MyRunnable10();
        Runnable r11 = new MyRunnable11();
        Runnable r12 = new MyRunnable12();
        Runnable r13 = new MyRunnable13();
        Runnable r14 = new MyRunnable14();
        Runnable r15 = new MyRunnable15();
        Runnable r16 = new MyRunnable16();


        Thread t1 =new Thread(r1);
        Thread t2 =new Thread(r2);
        Thread t3 =new Thread(r3);
        Thread t4 =new Thread(r4);
        Thread t5 =new Thread(r5);
        Thread t6 =new Thread(r6);
        Thread t7 =new Thread(r7);
        Thread t8 =new Thread(r8);
        Thread t9 =new Thread(r9);
        Thread t10 =new Thread(r10);
        Thread t11 =new Thread(r11);
        Thread t12 =new Thread(r12);
        Thread t13 =new Thread(r13);
        Thread t14 =new Thread(r14);
        Thread t15 =new Thread(r15);
        Thread t16 =new Thread(r16);

        t1.start();
        t2.start();
        t3.start();
        t4.start();
        t5.start();
        t6.start();
        t7.start();
        t8.start();
        t9.start();
        t10.start();
        t11.start();
        t12.start();
        t13.start();
        t14.start();
        t15.start();
        t16.start();


    }
}

class MyRunnable1 implements Runnable {
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(1);
        }
    }
}

class MyRunnable2 implements Runnable{
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(2);
        }
    }
}

class MyRunnable3 implements Runnable {
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(3);
        }
    }
}

class MyRunnable4 implements Runnable{
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(4);
        }
    }
}

class MyRunnable5 implements Runnable {
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(5);
        }
    }
}

class MyRunnable6 implements Runnable{
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(6);
        }
    }
}

class MyRunnable7 implements Runnable {
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(7);
        }
    }
}

class MyRunnable8 implements Runnable{
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(8);
        }
    }
}

class MyRunnable9 implements Runnable {
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(9);
        }
    }
}

class MyRunnable10 implements Runnable{
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(10);
        }
    }
}

class MyRunnable11 implements Runnable {
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(11);
        }
    }
}

class MyRunnable12 implements Runnable{
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(12);
        }
    }
}

class MyRunnable13 implements Runnable {
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(13);
        }
    }
}

class MyRunnable14 implements Runnable{
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(14);
        }
    }
}

class MyRunnable15 implements Runnable {
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(15);
        }
    }
}

class MyRunnable16 implements Runnable{
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println(16);
        }
    }
}
